{% extends "layout.html" %}
{% block title %}
<title>小试牛刀</title>
{% endblock %}

{% block style %}

{% endblock %}

{% block li %}
    {% if not obj.isTeacher %}
    <li><a href="content.html">小试牛刀</a></li>
    {% endif %}
    {% if obj.isTeacher %}
    <li><a href="content.html">任务小智</a></li>
    {% endif %}
    <li>查看</li>
{% endblock %}

{% block content %}


    <div class="admin">
			<div class="panel admin-panel">
                <div class="panel-head"><strong>回看列表</strong></div>
                <table class="table table-hover">
                     <tr>
                        <th width="240">编号</th>
                         <th width="240"><span style="padding-left: 6px">学科编号</span></th>
                         <th width="240"><span style="padding-left: 20px">名称</span></th>
                         <th width="100"><span style="padding-left: 12px">成绩</span></th>
                    </tr>
                        {% for each in score %}
                            <tr onclick="submitForm(this)">
                                <form action="/exam.html/" method="get" id="form{{ forloop.counter }}">
                                    <td>{{ forloop.counter }}</td>
                                    <td>{{ each.subject.subId }}</td>
                                    <td>{{ each.name }}</td>
                                    <td><span style="padding-left: 20px">{{ each.score }}</span></td>
                                    <input type="hidden" name="subjectId" value="{{ each.subject.subId}}">
                                    <input type="hidden" name="testName" value="{{ each.name}}">
                                    <input type="hidden" name="clzId" value="{{ each.clz.clsId}}">
                                </form>
                            </tr>
                        {% endfor %}


                </table>


			    <p class="text-right text-gray"><a class="text-gray" target="_blank" href="http://www.pintuer.com"></a></p>
            </div>
    </div>

{% endblock %}

{% block js %}
    <script>
        $(function () {
            $('#test').addClass('active')
            $('#home').removeClass('active')
        });
         var submitForm = function (obj) {
            var str = $(obj).children()[0]
            var form = $(str ).prop('id')
            $('#'+form).submit()
        }
    </script>
{% endblock %}
</html>